<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数据表列表</title>
<link rel="stylesheet" type="text/css" href="/Public/layui/css/layui.css" media="all">
<link rel="stylesheet" type="text/css" href="/Public/Admin/css/table.css" media="all">

</head>

<body>
<div class="header">
<div>
	<div class="title">数据备份</div>
	<blockquote class="layui-elem-quote">这个貌似不用多介绍，因为你已经在太多的地方都看到</blockquote>&nbsp;&nbsp;
    <a href="./index" ><button class="layui-btn" ><i class="layui-icon"></i>数据表列表</button></a>&nbsp;&nbsp;
	<a href="./import" ><button class="layui-btn"><i class="layui-icon"></i>查看备份</button></a>&nbsp;&nbsp;
	<a href="./repair" ><button class="layui-btn"><i class="layui-icon"></i>优化表</button></a>&nbsp;&nbsp;
    <a href="./repair" ><button class="layui-btn"><i class="layui-icon"></i>修复表</button></a>&nbsp;&nbsp;
    <a href="javascript:;" class="real"><button class="layui-btn"><i class="layui-icon"></i>刷新一下</button></a>&nbsp;&nbsp;
</div>
<span class="tabscount"><span class="padding"><a href="javascript:;" id="btn_backup"><i class="layui-icon"></i>一键备份</a></span>&nbsp;&nbsp;总共<span class="counts"><?php echo ($tables); ?></span>个表,共<?php echo ($total); ?></span>
<div class="layui-form">
  <table class="layui-table" id="tb">
    <colgroup>
      <col width="50">
      <col width="150">
      <col width="150">
      <col width="200">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th class="algin">数据表</th>
        <th class="algin">数据量</th>
        <th class="algin">数据大小</th>
        <th class="algin">排序规则</th>
        <th class="algin">引擎</th>
        <th class="algin">创建时间</th>
        <th class="algin">最近操作</th>
        <th class="algin">状态</th>
        <th class="algin">操作</th>
      </tr> 
    </thead>
    <tbody>
    <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$table): $mod = ($i % 2 );++$i;?><tr class="algin">
      <td><?php echo ($table["name"]); ?></td>
      <td><?php echo ($table["rows"]); ?></td>
      <td><?php echo (format_bytes($table["data_length"])); ?></td>
      <td><?php echo ($table["collation"]); ?></td>
      <td><?php echo ($table["engine"]); ?></td>
      <td><?php echo ($table["create_time"]); ?></td>
      <td><?php echo ($table["update_time"]); ?></td>
      <td class="info">未备份</td>
      <td class="action">
      <div class="layui-btn-group">
      <button class="layui-btn layui-btn-primary layui-btn-small backup_deldata" title="清空表信息" data-name="<?php echo ($table["name"]); ?>" data-row="<?php echo ($i); ?>">清空表</button>
      <button class="layui-btn layui-btn-primary layui-btn-small backup_one_table" title="快速备份表" data-name="<?php echo ($table["name"]); ?>" data-row="<?php echo ($i); ?>"><i class="layui-icon"></i></button>
      <button class="layui-btn layui-btn-primary layui-btn-small edit_one_table" title="编辑表信息"><i class="layui-icon"></i></button>
      <button class="layui-btn layui-btn-primary layui-btn-small del_one_table" data-name="<?php echo ($table["name"]); ?>" data-row="<?php echo ($i); ?>" title="删除数据表"><i class="layui-icon"></i></button>
      <!--  <a class="ajax-get confirm" href="./delete?table=<?php echo ($table["name"]); ?>" title="删除当前备份" data-row="<?php echo ($i); ?>"></a> -->
      </div>
      </td>
    </tr><?php endforeach; endif; else: echo "" ;endif; ?>
    </tbody>
  </table>
</div>

</div>
<script src="/Public/js/jquery-1.8.3.min.js" ></script>
<script src="/Public/layui/layui.js" ></script>
<script src="/Public/admin/js/table.js" ></script>
</body>
</html>